package ui;

import javax.swing.JPanel;

import java.awt.Color;
import java.awt.BorderLayout;

import logic.ACListAdmin;
import logic.ACListUser;

public class AdminUI extends JPanel {
//Connect connect;
ui.GlobalLogoutPanel globallogoutpanel;
	/**
	 * Create the panel.
	 */
	public AdminUI(GlobalLogoutPanel globallogoutpanel) {
		
		this.globallogoutpanel = globallogoutpanel;
		
		setBackground(Color.decode("#3a3a3a"));
		setSize(GlobalScreen.SIZE);
		setLayout(new BorderLayout(0, 0));
		// Instantiates Components

	
		
		AdminCenterPanel adminCenterPanel = new AdminCenterPanel();
		AdminPanel adminPanel = new AdminPanel();
		
		
		ACListAdmin ac = new ACListAdmin(adminPanel,this, adminCenterPanel);
		adminPanel.addACList(ac);
		adminCenterPanel.addACList(ac);
		// THE BOTTOM LOGOUTPANEL INCLUDING LOGGED IN INFO
		
		
	    add(adminCenterPanel, BorderLayout.CENTER);
	    add(adminPanel, BorderLayout.LINE_START);

		// SWITCHING BETWEEN DASHBOARD AND OTHER LAYOUTS HERE:
		
		//AdminDashboard adminDashboard = new AdminDashboard();
		//add(adminDashboard, BorderLayout.CENTER);

		

		
		// THE LEFT SIDE PANEL INCLUDING AVATAR AND PERHAPS SOME INFORMATION		
		
		
		
  

	}
	public void addLogoutPanel(){
		add(globallogoutpanel, BorderLayout.SOUTH);
	}
	public ui.GlobalLogoutPanel getLogoutpanel() {
		return globallogoutpanel;
	}
	public void setLogoutpanel(ui.GlobalLogoutPanel logoutpanel) {
		this.globallogoutpanel = logoutpanel;
	}

}
